Objects Wont Delete

Created a test module with several hundred objects.  Randomly n objects were chosen.  Each selected object had the "Object Text" attribute modified 11 times.

I wrote this function to delete objects that were not modified 11 times but nothing gets deleted.  This has me puzzled since logically I think I am doing this correctly but seems I am missing a step.  Using DOORS 9.2

 

void deleteObjects( Module& m )
{
  
  int getHistoryCount( const Object& o )
  {
    History h
    int count = 0 

    for h in o do
    {
       count++
    }
    return count
  }



  Object o
  for o in m do
  {
    if ( getHistoryCount(o) < 2 )
    {
        hardDelete(o)
    }
  }

  save( m )
  purgeObjects_( m )
  save( m )
}


// test 
Module m = edit( "/Sandbox/test", true, true )
deleteObjects( m )

 


a8155058 - Tue Apr 07 11:46:41 EDT 2015

Re: Objects Wont Delete
a8155058 - Tue Apr 07 13:12:21 EDT 2015

solved my issue. replaced the "hardDelete" with "softDelete" and it worked. go figure.